﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MensUnoShop.Models.ViewModels.IndexViewModel>" %>
<%@Import Namespace="MensUnoShop.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	men'suno SHOP
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="CONTENT">
<div class="INDEX_LEFT">
    <ul>
        <li>
	        <div class="EDM_ORDER">
                <ul>
                    <li><h1>訂閱電子報</h1></li>
                    <li></li>
                    <li>    
                      <input id="edm" name="edm" type="text" class="EDM_BOX" value="Sign Up For Email" onfocus="if(value=='Sign Up For Email') {value=''}" onblur="if (value=='') {value='Sign Up For Email'}"/><input type="button" name="button" id="button" value="送出 Send" class="EDM_BT" onclick="sendEdm();" />
                    </li>
                </ul>
            <br class="CLEAR" />
            </div>
        </li>
        <li class="BANNER1">
          <%=Html.GetAdIndex(Model.AD.XINDEX) %>
        </li>
        <%
            DateTime s; 
            foreach (var x in Model.AD.X650.Elements("ad").
              Where(e => DateTime.TryParse(e.Attribute("dateopen").Value, out s) ? s <= DateTime.Now : true && DateTime.TryParse(e.Attribute("dateclose").Value, out s) ? s >= DateTime.Now : true))
          { %>
            <li class="BANNER2"><a href="<%=x.Element("link").Value %>" target="<%=x.Attribute("isopen").Value == "1" ? "_blank" : string.Empty %>"><img src="<%=x.Element("img").Value %>" border="0" /></a></li>
        <%} %>
    </ul>
</div>
<div class="INDEX_RIGHT">
<ul>
<%Html.RenderPartial("/Views/Shared/SearchBox.ascx"); %>
    <%Html.RenderPartial("/Views/Shared/HotSearch.ascx", Model.HOTKEYLIST); %>
    <li class="VIDEO">
      <iframe width="280" height="187" src="http://www.youtube.com/embed/HxYa1o5kX6c" frameborder="0" allowfullscreen></iframe>
    <h1>men's uno official CF</h1>
    <!--span class="PRIV"><a href="#">PRIV</a></span><span class="NEXT"><a href="#">NEXT</a></span><span class="SHOW_VIDEO"><a href="#">觀賞大檔</a></span-->
    </li>
<%Html.RenderPartial("/Views/Shared/News.ascx",Model.NEWS); %>
    <%if (Model.AD.X274.Elements("ad") != null)
      {
          Random r = new Random();
          IEnumerable<XElement> alist = Model.AD.X274.Elements("ad").
              Where(e => DateTime.TryParse(e.Attribute("dateopen").Value, out s) ? s <= DateTime.Now : true && DateTime.TryParse(e.Attribute("dateclose").Value, out s) ? s >= DateTime.Now : true);
          if (alist.Count() > 0)
          {
              XElement a = alist.ElementAt(r.Next(alist.Count() - 1));
    %>
            <li class="BANNER3"><a href="<%=a.Element("link").Value %>" target="<%=a.Attribute("isopen").Value == "1" ? "_blank" : string.Empty %>"><img src="<%=a.Element("img").Value %>" border="0" /></a></li>
    <%}
      } %>
    <li class="BANNER3"><a href="http://www.mensuno.com.tw/" target="_blank"><img src="/Content/page_img/logo_mensuno.gif" /></a></li>
    <li class="BANNER3"><a href="http://www.mplusmodel.com/" target="_blank"><img src="/Content/page_img/logo_mplus.gif" /></a></li>
</ul>
</div>
<br class="CLEAR"/>
</div>

</asp:Content>
